-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/add importer for asg scheduled action #8300
Feature/add importer for asg scheduled action #8300
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @taxpon 👋 This is off to a good start. Two things and we should be able to get this in. Thanks!
testAccCheckScalingScheduleExists("aws_autoscaling_schedule.foobar", &schedule), | ||
), | ||
}, | ||
// Test existent resource import |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of creating a new acceptance test that requires creating duplicate testing infrastructure, the new ImportStateVerify: true
TestStep
should be added to all acceptance tests for the resource (except _disappears
) to verify that each resource configuration successfully imports. This can find issues in the resource Read
function where we are not properly refreshing the Terraform state. The non-existent resource import TestStep
can be added just to the _basic
test. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 644a638
@@ -87,3 +87,11 @@ The following arguments are supported: | |||
In addition to all arguments above, the following attributes are exported: | |||
|
|||
* `arn` - The Amazon Resource Name (ARN) of the scheduled action. | |||
|
|||
## Import |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This documentation was added to the aws_appautoscaling_scheduled_action
resource page instead of website/docs/r/autoscaling_schedule.html.markdown
😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I am sorry for the poor mistake..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 850642a
d7f98c8
to
850642a
Compare
@bflad Thank you for your reviewing. I fixed them. Please review this PR again. This is the results of test running:
|
@bflad Could you kindly review this again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the gentle reminder, @taxpon! Looks good. 🚀
--- PASS: TestAccAWSAutoscalingSchedule_disappears (107.93s)
--- PASS: TestAccAWSAutoscalingSchedule_recurrence (109.90s)
--- PASS: TestAccAWSAutoscalingSchedule_basic (111.21s)
--- PASS: TestAccAWSAutoscalingSchedule_zeroValues (141.73s)
--- PASS: TestAccAWSAutoscalingSchedule_negativeOne (142.12s)
This has been released in version 2.11.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Fixes #5617
Changes proposed in this pull request:
Output from acceptance testing: